package com.web44.springboot.config;

import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Title: MybatisConfig
 * @Description:
 * @Auther: py
 * @Version: 1.0
 * @create 2024/3/4 10:21
 */
@Configuration
public class MybatisConfig {

    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return new ConfigurationCustomizer() {
            @Override
            public void customize(org.apache.ibatis.session.Configuration configuration) {
                // 开启驼峰适配
                configuration.setMapUnderscoreToCamelCase(true);

            }
        };
    }
}
